package com.shiwaixiangcun.customer

import com.shiwaixiangcun.customer.app.App
import com.shiwaixiangcun.customer.utils.ApkVersionCodeUtils

/**
 * @author Administrator
 * @date 2017/9/15
 * 全局网络请求地址
 */

object GlobalApi {
    /**
     * 测试服务器
     */
    private val DOMAIN_TS = if (BuildConfig.DEBUG) "http://ts.shiwaixiangcun.cn" else "http://ts.hxteb.com"
    private val DOMAIN_HM = if (BuildConfig.DEBUG) "http://hm.shiwaixiangcun.cn" else "http://hm.hxteb.com"
    private val DOMAIN_OT = if (BuildConfig.DEBUG) "http://ot.shiwaixiangcun.cn" else "http://ot.hxteb.com"
    private val DOMAIN_NO = if (BuildConfig.DEBUG) "http://shiwaixiangcun.cn" else "http://hxteb.com"
    private val DOMAIN_DC = if (BuildConfig.DEBUG) "https://test.chunyu.me" else "https://www.chunyuyisheng.com"
    val DOMAIN_PM = if (BuildConfig.DEBUG) "http://pm.shiwaixiangcun.cn" else "http://pm.hxteb.com"
    val DOMAIN_MK = if (BuildConfig.DEBUG) "http://mk.shiwaixiangcun.cn" else "http://mk.hxteb.com"

    val versionCode = ApkVersionCodeUtils.getVerName(App.getContext())!!

    /**
     * 验证摄像头是否被绑定
     */
    val checkDeviceIsBind = "$DOMAIN_HM/mc/verification/camera.json"
    /**
     * 摄像头解绑
     */
    val unbindCamera = "$DOMAIN_HM/mc/camera/remove.json"
    val bindCamera: String? = "$DOMAIN_HM/mc/save/camera.json"
    val cameraToken: String? = "$DOMAIN_HM/mc/camera/token.json"
    val cameraOffReason: String? = "$DOMAIN_HM/mi/camera/offLine.htm"
    val watchOffReason = "$DOMAIN_HM/mi/offline/view.htm"
    val qualityService = "$DOMAIN_MK/mi/toHomeService/type/list/selected/services.json"
    val serviceDetail = "$DOMAIN_MK/mi/toHomeService/detail.json"
    val serviceType: String? = "$DOMAIN_MK/mi/toHomeService/type/list.json"
    val serviceTypeList = "$DOMAIN_MK/mi/toHomeService/list.json"
    val commitAppointment: String? = "$DOMAIN_MK/mc/toHomeService/order/add.json"
    val familyHealthList: String? = "$DOMAIN_HM/mc/own/and/family/health/data.json"
    val userHealthDynamic: String? = "$DOMAIN_HM/mc/health/dynamic/data.json"
    /**
     * 房屋相关
     */
    val houseDetail = "$DOMAIN_PM/mi/house/resources/detail/"


    val serviceList: String? = "$DOMAIN_PM/mc/online/platinum/stewardship/service/records.json"
    val serviceListDetail = "$DOMAIN_PM/mc/online/repair/detail.json"
    val butlerMain: String? = "$DOMAIN_PM/mi/online/platinum/stewardship/type/list.json"
    val HEALTH_REPORT: String? = "$DOMAIN_HM/mc/physicalExamination/list.json"
    val REPORT_DETAIL = "$DOMAIN_HM/mc/physicalExamination/detail.htm"
    val EVALUATIONI_RECORD = "$DOMAIN_HM/mc/assessment/list.json"
    val EVALUATION_DETAIL = "$DOMAIN_HM/mc/assessment/detail.htm"
    val merchantUrl = "$DOMAIN_PM/mi/merchant/detail/view.htm"
    /**
     * OT服务器相关
     */

    var getBanner = "$DOMAIN_OT/mi/banner/listdata.json"
    var getToolCategory = "$DOMAIN_OT/mi/app/category/tree.json"
    var getSite = "$DOMAIN_OT/mi/site/listdata.json"
    var listPage = "$DOMAIN_OT/mi/banner/listdata.json"
    /**
     * HM服务器相关
     */
    var pressureBlood = "$DOMAIN_HM/mc/pressure/history/record.json"
    var pressureHeartrate = "$DOMAIN_HM/mc/pressure/heartrate.json"
    var sugarList = "$DOMAIN_HM/mc/sugar/list.json"
    var bmiList = "$DOMAIN_HM/mc/bmi/list.json"
    var customerDetail = "$DOMAIN_HM/mc/customer/detail.json"
    var pressureRecord = "$DOMAIN_HM/mc/pressure/history/record.json"
    var bloodFat = "$DOMAIN_HM/mc/blood/fat.json"
    var getEvaluating = "$DOMAIN_HM/mi/assessment/view.htm"
    var getPhysical = "$DOMAIN_HM/mc/customer/detail.json"
    var getHeartRate = "$DOMAIN_HM/mc/pressure/heartrate.json"
    var getBloodSugar = "$DOMAIN_HM/mc/sugar/list.json"
    var getWeight = "$DOMAIN_HM/mc/bmi/list.json"
    var getBloodFat = "$DOMAIN_HM/mc/blood/fat.json"
    var checkToken = "$DOMAIN_HM/mc/validate/access/token.json"
    var getDoctor = "$DOMAIN_HM/mc/chunyu/view.json"
    var getFamily = "$DOMAIN_HM/mc/family/list.json"
    var deleteFamily = "$DOMAIN_HM/mc/removeFamily.json"
    var addFamily = "$DOMAIN_HM/mc/addFamily.json"
    var getPhone = "$DOMAIN_HM/mc/phone.json"
    var getRecipeType = "$DOMAIN_HM/mi/health/dietType.json"
    var getRecipeList = "$DOMAIN_HM/mi/health/dietList.json"
    var getMessage = "$DOMAIN_HM/mc/message/core/list.json"
    var watch_bind = "$DOMAIN_HM/mc/bind.json"
    var unBindWatch = "$DOMAIN_HM/mc/remove/watch.json"
    var addFamilyNumber = "$DOMAIN_HM/mc/save/sosPhone.json"
    var sosList = "$DOMAIN_HM/mc/sosList.json"
    var modifyFamilyNumber = "$DOMAIN_HM/mc/update/sosPhone.json"
    var deleteNumber = "$DOMAIN_HM/mc/delete/sosPhone.json"
    var modifyWatchInfo = "$DOMAIN_HM/mc/update/watchSetUp.json"
    var getLocation = "$DOMAIN_HM/mc/map/view.htm"
    var callSOS = "$DOMAIN_HM/mc/sosCall.json"
    /**
     * Mk服务器相关
     */

    var getCategory = "$DOMAIN_MK/mi/goods/category/tree.json"
    var getAddress = "$DOMAIN_MK/mc/delivery/address/listdata.json"
    var deleteAddress = "$DOMAIN_MK/mc/delivery/address/remove.json"
    var modifyDefaultAddress = "$DOMAIN_MK/mc/delivery/address/modify.json"
    var addAddress = "$DOMAIN_MK/mc/delivery/address/add.json"
    var getAllOrders = "$DOMAIN_MK/mc/order/my/listPage.json"
    var deleteOrder = "$DOMAIN_MK/mc/order/customer/delete.json"
    var cancelOrder = "$DOMAIN_MK/mc/order/cancel.json"
    var confirmOrder = "$DOMAIN_MK/mc/order/customer/receive.json"
    var putOrder = "$DOMAIN_MK/mc/order/add.json"
    var getOrderDetail = "$DOMAIN_MK/mc/order/detail.json"
    var getOrderContent = "$DOMAIN_MK/mi/goods/detail/content.htm"
    var getMallHome = "$DOMAIN_MK/mi/goods/subject/home.json"
    var getGoodDetail = "$DOMAIN_MK/mi/goods/detail.json"
    var getStock = "$DOMAIN_MK/mi/goods/detail/attribute/"
    var getGuessLike = "$DOMAIN_MK/mi/goods/subject/listpage.json"
    var getKeyword = "$DOMAIN_MK/mi/keywords.json"
    var searchGood = "$DOMAIN_MK/mi/goods/search/listpage.json"
    var payZhiFuBao = "$DOMAIN_MK/mc/pay/ZhiFuBao.json"
    var payWeiXin = "$DOMAIN_MK/mc/pay/WeiXin.json"
    var searchCategory = "$DOMAIN_MK/mi/goods/category/listpage.json"
    var shareGoods = "$DOMAIN_MK/mi/goods/share/"
    var appLogo = DOMAIN_MK + "http://resource.hxteb.com/group1/M00/00/26/rBKx5Vl4TMCAUPgUAAB6YxNdWvs030.png"
    var getJudgeUrl = "$DOMAIN_MK/mi/goods/share/"
    var afterService = "$DOMAIN_MK/mc/after/sale/listPage.json"
    var afterServiceDetail = "$DOMAIN_MK/mc/after/sale/detail.json"
    var cancelAfterService = "$DOMAIN_MK/mc/after/sale/cancel.json"
    var addEvaluate = "$DOMAIN_MK/mc/evaluate/add.json"
    var getEvaluateList = "$DOMAIN_MK/mi/evaluate/listPage.json"
    var refund = "$DOMAIN_MK/mc/after/sale/add.json"
    var doctorMaster = "$DOMAIN_MK/mi/doctor/list.json"
    var doctorDetail = "$DOMAIN_MK/mi/doctor/detail.htm"
    /**
     * PM服务器相关
     */
    var addRight = "$DOMAIN_PM/mc/online/rights/add.json"
    var rightRecord = "$DOMAIN_PM/mc/online/rights/listpage.json"
    var rightDetail = "$DOMAIN_PM/mc/online/rights/detail.json"
    var getMerchant = "$DOMAIN_PM/mi/merchant/listpage/type.json"
    var getPrivacy = "$DOMAIN_PM/mi/privacyPolicy.htm"
    var getRegister = "$DOMAIN_PM/mi/activity/listpage.json"
    var activityDetail = "$DOMAIN_PM/mi/activity/detail.htm"
    var refreshToken = "$DOMAIN_NO/oauth2/token"
    var articleListpage = "$DOMAIN_PM/mi/article/listpage.json"
    var OnlineRepair = "$DOMAIN_PM/mc/online/type/add.json"
    var toRent = "$DOMAIN_PM/mc/house/mobile/lease.json"
    var associatedHouses = "$DOMAIN_PM/mc/current/houses.json"
    var toSeller = "$DOMAIN_PM/mc/house/mobile/sell.json"
    var getRent = "$DOMAIN_PM/mc/house/mobile/rental.json"
    var getBuy = "$DOMAIN_PM/mc/house/mobile/buy.json"
    var records = "$DOMAIN_PM/mc/online/repair/listpage.json"
    var decorateList = "$DOMAIN_PM/mi/decorate/company/listpage.json"
    var companyDetail = "$DOMAIN_PM/mi/decorate/company/detail.json"
    var fileSend = "$DOMAIN_PM/upload/images.json"
    var information = "$DOMAIN_NO/mc/current.json"
    var areaTree = "$DOMAIN_PM/mc/region/tree.json"
    var modify = "$DOMAIN_NO/mc/modify.json"
    var houseUnit = "$DOMAIN_PM/mc/house/unit.json"
    var housePhone = "$DOMAIN_PM/mc/house/phone.json"
    var bindPhone = "$DOMAIN_PM/mc/bind/phone.json"
    var article = "$DOMAIN_PM/mi/article/active/listpage.json"
    var userImage = "$DOMAIN_NO/mc/customer/avatar.json"
    var findCityList = "$DOMAIN_PM/mi/cityCode/find.json"
    var merchantDetail = "$DOMAIN_PM/="
    var getArticle = "$DOMAIN_PM/mi/article/detailView.htm"
    var logout = "$DOMAIN_PM/logout.htm"
    var feedBack = "$DOMAIN_PM/mi/feedback/add.json"
    var articleDetailView = "$DOMAIN_PM/mi/article/detailView.htm"
    var appUpdate = "$DOMAIN_PM/mi/app/update/android.json"
    var merchantType = "$DOMAIN_PM/mi/merchant/type/listdata.json"
    var merchant = "$DOMAIN_PM/mi/merchant/listpage.json"
    /**
     * Others
     */
    var chunyuDoctor = DOMAIN_DC
    var login = "$DOMAIN_NO/oauth2/token"
    var getVerification = "$DOMAIN_NO/mi/dynamic/password/message.json"
    /**
     * ticket
     */
    var getTickets = "$DOMAIN_TS/mi/ticket/list.json"
    var ticketDetail = "$DOMAIN_TS/mi/ticket/detail.json"
    var buyTicket = "$DOMAIN_TS/mc/ticket/buy.json"
    var payWeiXinTicket = "$DOMAIN_TS/mc/pay/WeiXin.json"
    var payZhiFuBaoTicket = "$DOMAIN_TS/mc/pay/ZhiFuBao.json"
    var myTicket = "$DOMAIN_TS/mc/ticket/myTicket.json"
    var ticketOrderDetail = "$DOMAIN_TS/mc/ticket/myTicket/detail.json"
    var myTicketInvalid = "$DOMAIN_TS/mc/ticket/myTicket/invalid.json"
    /**
     * 智能设备
     */

    var getDeviceList = "$DOMAIN_HM/mc/watchData.json"
    var editCameraName = "$DOMAIN_HM/mc/update/camera/name.json"
    var modifyCameraPwd = "$DOMAIN_HM/mc/update/camera/password.json"
    var shareList = "$DOMAIN_HM/mc/camera/share/list.json"
    var addShare = "$DOMAIN_HM/mc/camera/share/doshare.json"
    var cancelShare = "$DOMAIN_HM/mc/camera/share/cancel.json"
    var verificationCamera = "$DOMAIN_HM/mc/verification/camera.json"
    //到家服务
    var getWatchDetail = "$DOMAIN_HM/mc/watch/details.json"
    /**
     * 获取摄像头详情信息quality
     */
    var getCameraDetail = "$DOMAIN_HM/mc/camera/data.json"
    var familyInteraction = "$DOMAIN_HM/mc/interactive/data.json"
    /**
     * 首页Banner以及ToolBar
     */
    var GetHomeBanner = "$DOMAIN_OT/mi/app/category/recommend.json"
    var houseRenting = "$DOMAIN_PM/mi/house/resources/listpage.json"
    /**
     * 用户的健康数据
     */
    var userHealthData = "$DOMAIN_HM/mc/customer/health/data.json"
    var healthPlan = "$DOMAIN_HM/mc/own/and/family/scheme/view.htm"
    var getIntroduceImg = "$DOMAIN_PM/mi/online/platinum/stewardship/image.json"


    //获取房产列表
    var getPropertyList = "$DOMAIN_PM/mc/v$versionCode/my/house/listdata.json?"
    //添加房产
    var bindHouse = "$DOMAIN_PM/mc/v$versionCode/my/house/add.json"
    //删除房产
    val deleteProperty = "$DOMAIN_PM/mc/v$versionCode/my/house/remove.json"
    val propertyFee = "$DOMAIN_PM/mc/v$versionCode/charge/statement/propertyFee/detail.json"
    //物业缴费记录
    val paymentRecord = "$DOMAIN_PM/mc/v$versionCode/charge/statement/payment/record.json"
    //物业缴费记录详情
    val recordsDetail = "$DOMAIN_PM/mc/v$versionCode/charge/statement/payment/record/detail.json"
    val payPropertyWx = "$DOMAIN_PM/mc/v$versionCode/pay/WeiXin.json"
    val payPropertyZfb = "$DOMAIN_PM/mc/v$versionCode/pay/ZhiFuBao.json"

}
